@mitu I followed the exact steps here:
https://retropie.org.uk/forum/topic/35355/unable-to-set-control-mapping-in-dolphin-dolphin-emu-not-loading/8?_=1714924854335
and it all worked but I was left with that login screen.
I reverted back to my SD card backup just before I did those steps and followed the instructions @abj gave me above and it worked perfectly fine!